Page({
  data:{
      fei:'',
      feiban:'',
      condition:false
  },
  formsubmit(e){
      console.log(e)
      let bd = Number(e.detail.value.property)
      let fei = 0
      let feiban = 0
      if(bd<=10000){
          fei = 50
      }else if(bd>10000&&bd<=100000){
          fei = bd*0.025-200
      }else if(bd>100000&&bd<=200000){
          fei = bd*0.02+300
      }else if(bd>200000&&bd<=500000){
          fei = bd*0.015+1300
      }else if(bd>500000&&bd<=1000000){
          fei = bd*0.01+3800
      }else if(bd>1000000&&bd<=2000000){
          fei = bd*0.009+4800
      }else if(bd>2000000&&bd<=5000000){
          fei = bd*0.008+6800
      }else if(bd>5000000&&bd<=10000000){
          fei = bd*0.007+11800
      }else if(bd>10000000&&bd<=20000000){
          fei = bd*0.006+21800
      }else if(bd>20000000){
          fei = bd*0.005+41800
      }
      feiban = fei/2
      fei = fei.toFixed(2)
      feiban = feiban.toFixed(2)
      this.setData({
          fei,feiban
      })
  },
  switchchange(e){
      console.log(e)
      let condition = e.detail.value
      if(condition){
          this.setData({
              fei:0,
              feiban:0,
              condition
          })
      }else{
          this.setData({
              fei:0,
              feiban:0,
              condition
          })
      }
  },
  formReset: function(){
      this.setData({
          fei:'',
          feiban:'',
      })
  }
})